<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>反馈信息管理</title> <#include "/WEB-INF/content/module-index.html">
<script type="text/javascript">
var oper=[
      	{"id":"0","text":"未读"},
      	{"id":"1","text":"已读"}
      ];

$(function(){
	$("#search").click(function(){
		var mobile=$("#mobile").val();
		var leftCreateTime=$("#leftCreateTime").datetimebox("getValue");
		var rightCreateTime=$("#rightCreateTime").datetimebox("getValue");
		var type=$("#type").combobox("getValue");
		var tid=$("#tid").combobox("getValue");
		$("#grid").datagrid("reload",{"mobile":mobile,"leftCreateTime":leftCreateTime,"rightCreateTime":rightCreateTime,
		"type":type,"tid":tid});		
	});	
	$("#type").combobox({
	  		valueField : 'id',
	  		textField : 'text',
	  		editable:false,
	        panelHeight:'auto',
	        data:oper
		});
});

function typeFormatter(value,rowData,rowIndex){
	if(value=="0"){
		return "未读";
	}else
		if(value=="1"){
			return "已读";
		}else
			return "未知";
}

function contentFormatter(value,rowData,rowIndex){
	if(value.length>50){
		value=value.substring(0,50)+"...";
	}
	return value;
}
</script>
<style>
a.btn-border{
	border: 1px solid #ccc;
}
</style>
</head>
<body>
<body class="easyui-layout">
	<div region="center" style="padding: 5px; background:#eee;">
		<div id="toolbar">
			<input id="mobile" placeholder="用户手机号码"/>
			创建时间:<input id="leftCreateTime" class="easyui-datetimebox" editable="false"/>至
			<input id="rightCreateTime" class="easyui-datetimebox" editable="false"/>
			反馈信息类型:<input class="easyui-combobox" data-options=" valueField:'tid',textField:'name',url:'${request.contextPath}/message/freedbackType/getTypeList'"  id="tid" name="tid" placeholder="反馈类型"/>
			反馈信息状态:<input id="type" placeholder="反馈信息状态"/>
			<a id="search" class="easyui-linkbutton" icon="icon-search" style="border: 1px solid #ccc" plain="true">搜索</a>
			<@auth code="message:feedback:*:edit">
				<a href="javascript:void(0);" class="easyui-linkbutton btn-border" plain="true" iconCls="icon-edit" onclick="javascript:edit();">查看</a> 
				<!-- <a id="group" class="easyui-linkbutton" onclick="javascript:group();" icon="icon-edit" style="border: 1px solid #ccc" plain="true">查看</a> -->
			</@auth>		
		</div>
		<table id="grid" class="easyui-datagrid" url="query" align="center" idField="fid" rownumbers="true" striped="true" fitColumns="true" fit="true" pagination="true" singleSelect="false" toolbar="#toolbar">
			<thead>
				<tr>
					<th field="uid" width="10">用户手机号码</th>
					<th field="typeName" width="10">反馈类型</th>
					<th field="feedbackcontent" width="50" formatter="contentFormatter">反馈内容</th>
					<th field="createTime" width="10" align='center'>创建时间</th>
					<th field="status" width="10" formatter="typeFormatter">状态</th>					
				</tr>
			</thead>
		</table>
	</div>
</body>
</body>

</html>